Get-CsOnlineUser (Microsoft Teams PowerShell)

Get-CsOnlineUser PowerShell queries can be applied directly in the UMP-365 database. Filter statement rules are enforced according to Teams PowerShell Modules version 3.0 or later. Filters are defined in the dbo.ApplicationSettings table. See examples in the table below. For more information, see GetCsOnlineUser.

Get-CsOnlineUser Filters

MS-SQL ID

MS-SQL Value (PowerShell Command Line Syntax)

Action

O365CsOnlineUsersFilter

Copy
UserPrincipalName -like '*.activecommunications.eu' -and (AssignedPlan -eq 'MCOEV' -or AssignedPlan -like 'MCOPSTN*')

Retrieves users with a specific Microsoft Service Plan and matching DNS FQDN subdomain.

O365CsOnlineUsersFilter

Copy
Deparment -eq 'Marketing'

Retrieves users for a specific department 'Marketing'.

O365CsOnlineUsersFilter

Copy
AssignedPlan -eq 'MCOEV' -and Country -eq 'France'

Retrieves users with a specific Microsoft Service Plan 'MCDEV' in matching country 'France'.

O365CsOnlineUsersFilter

Copy
Identity 'sip:brad@finebak.com'

Retrieves a specific user.

O365CsOnlineUsersFilter

Copy
LineURI -eq 'tel:+1234'
LineURI -eq 'tel:+1234,ext:'
LineURI -eq '1234'

Retrieves information for user accounts that have been assigned a specific phone number.

O365CsOnlineUsersFilter

Copy
EnterpriseVoiceEnabled -eq $True'

Retrieve only users enabled with Enterprise Voice.

O365CsOnlineUsersFilter

Copy
UsageLocation -eq 'Rotterdam''

Retrieve users for a specific location 'Rotterdam'.